home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-03-12 | 518 b | 29 lines | [TEXT/CWIE] |
- // Assert.cp
-
- #ifndef Assert_h
- #include "Assert.h"
- #endif
-
- static const char *PathTail( const char *path )
- {
- const char *tail = path;
- for ( const char *p = path; *p!= 0; p++ )
- if ( *p == '/' )
- tail = p + 1;
-
- return tail;
- }
-
- DebugMessage AssertionMessage( const char *file,
- uint32 line,
- const char *condition )
- {
- DebugMessage message;
-
- message << "Assertion failure at line " << line;
- message << " of " << PathTail( file );
- message << ": " << condition;
-
- return message;
- }
-